#ifndef VIDEO_H
#define VIDEO_H

#include <QMainWindow>
#include "QProcess"
#include "QTimer"
namespace Ui {
class video;
}

class video : public QMainWindow
{
    Q_OBJECT

public:
    explicit video(QWidget *parent = nullptr);
    ~video();
private slots:
    void on_calc_clicked();
    void read_process_output();
    void get_video_now_time();
    void on_up_clicked();

    void on_down_clicked();

    void on_open_clicked();

    void on_horizontalSlider_sliderMoved(int position);

    void on_horizontalSlider_sliderReleased();
    void on_back_clicked();

private:
    Ui::video *ui;
    QProcess myprocess;
    int total_times;
    QTimer mytimer;
    int now_times;
    int time_move_at;
    bool flag;//当我移动进度条时，定时器获取到的当前播放时间不可以设置上去
                //避免我进度条移动时，定时器触发当前时间覆盖回去
};

#endif // VIDEO_H
